package com.sen.app.schedul.services;

import java.util.Map;

import org.quartz.Scheduler;
import org.quartz.SchedulerException;

import com.sen.app.schedul.entity.JobConfigEntity;

/**
 * scheduler管理service接口
 * 
 * @author sen
 */
public interface SchedulManagerService {

    /**
     * add targger, 新增到DEFAULT_GROUP
     * 
     * @param triggerName
     * @param jobName
     * @param cronExpression
     * @param scheduler
     *            被操作的scheduler类
     */
    public void addTrigger(String triggerName, String jobName,
            String cronExpression, Scheduler scheduler)
            throws SchedulerException;

    /**
     * add targger, 新增到triggerGroupName
     * 
     * @param triggerName
     * @param triggerGroupName
     * @param jobName
     * @param jobGrourpName
     * @param cronExpression
     * @param scheduler
     *            被操作的scheduler类
     */
    public void addTrigger(String triggerName, String triggerGroupName,
            String jobName, String jobGrourpName, String cronExpression,
            Scheduler scheduler) throws SchedulerException;

    
    /**
     * 获取所有job配置,来自conf目录下
     * @return Map, key为文件名
     */
    public Map<String, JobConfigEntity> getAllJobConfig();
}
